<%--
  Created by IntelliJ IDEA.
  User: haol
  Date: 2016/9/23
  Time: 21:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/meta.jsp" %>
    <script type="text/javascript" src="${ctx}/js/gcu/apply/list.js"></script>
</head>
<body class="body_owner_list">
<ul class="breadcrumb">
    <li class="icon"></li>
    <li>您所在的位置：</li>
    <li>系统设置</li>
    <li>申请表管理</li>
</ul>
<%@ include file="/common/top.jsp" %>
<div class="widget widget-table">
    <div class="widget-content" id="formDiv">
        <form>
            <table class="table table-bordered">
                <tr>
                    <th>业主姓名</th>
                    <td class="pn-fcontent"><input type="text" name="applyName" class="form-control"></td>
                    <th>业主请求</th>
                    <td class="pn-fcontent"><input type="text" name="required" class="form-control"></td>
                    <th>处理人员</th>
                    <td class="pn-fcontent"><input type="text" name="handleName" class="form-control"></td>
                </tr>
                <tr>
                    <th>设置时间：</th>
                    <td class="pn-fcontent">
                        <input type="text" id="startDate" name="beginTime" readonly="readonly"
                               class="form-control" onclick="WdatePicker({startDate:'%y-%M-%d 00:00:00',readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss', maxDate:'#F{$dp.$D(\\\'endDate\\\')}'})" />
                    </td>
                    <th>至：</th>
                    <td class="pn-fcontent">
                        <input type="text" id="endDate" name="endTime" readonly="readonly" class="form-control"
                               onclick="WdatePicker({startDate:'%y-%M-%d 23:59:59',readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\\\'startDate\\\')}'})"/>
                    </td>
                </tr>
            </table>
            <div class="widget-bottom">
                <button type="submit" class="btn btn-info pull-right" id="searchBtn">搜索</button>
                <button type="button" class="btn btn-s-md pull-right" id="clearBtn">清空</button>
            </div>
        </form>
    </div>
</div>
<div class="separator line"></div>
<div class="widget widget-table">
    <div class="widget-content widget-list" >
        <form id="myForm">
        <table class="table table-striped table-bordered">
            <div class="panel-heading"><span class="badge">申请表列表</span></div>
            <tr>
                <th>序号</th>
                <th>业主姓名</th>
                <th>联系电话</th>
                <th>业主要求</th>
                <th>申请时间</th>
                <th>处理结果</th>
                <th>处理人员</th>
                <th>操作</th>
            </tr>
            <c:if test="${empty applyList}">
                <tr class='text-danger'>
                    <td colspan='8' align='center'>无数据存在！</td>
                </tr>
            </c:if>
            <c:forEach var="applys" items="${applyList}" varStatus="status">
                <tr>
                    <td>${status.count}</td>
                    <td>${applys.applyName}</td>
                    <td>${applys.applyTel}</td>
                    <td>${applys.required}</td>
                    <td>${applys.applyTime}</td>
                    <td>
                        <c:if test="${applys.handleResult eq 0}">未处理</c:if>
                        <c:if test="${applys.handleResult eq 1}">已处理</c:if>
                        <c:if test="${applys.handleResult eq 2}">推迟处理</c:if>
                        <c:if test="${applys.handleResult eq 3}">不合理</c:if>
                    </td>
                    <td>${applys.handleName}</td>
                    <td>
                        <a href="${ctx}/apply/edit/${applys.id}"><span class="label label-primary">详情</span></a>
                        <a href="${ctx}/apply/del/${applys.id}"><span class="label label-danger">删除</span></a>
                    </td>
                </tr>
            </c:forEach>
            </thead>
        </table>
        <div class="widget-bottom">
            <jsp:include page="/common/pager.jsp">
                <jsp:param value="users" name="url"/>
                <jsp:param value="${pagers.total}" name="items"/>
            </jsp:include>
        </div>
        </form>
        <div class="widget-bottom">
        </div>
    </div>
</div>
</div>
</body>
</html>
<!-- 每行模版 -->